home *** CD-ROM | disk | FTP | other *** search
- STRSTREAM(3C) Last changed: 10-20-98
-
-
- NNAAMMEE
- ssttrrssttrreeaamm - iioossttrreeaamm specialized to arrays
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssttrrssttrreeaamm..hh>>
-
- ccllaassss iiooss {{
- ppuubblliicc::
- eennuumm ooppeenn__mmooddee {{ iinn,, oouutt,, aattee,, aapppp,, ttrruunncc,, nnooccrreeaattee,, nnoorreeppllaaccee }}
- ;;
- //// aanndd lloottss ooff ootthheerr ssttuuffff,, sseeee iiooss((33CC)) ......
- }} ;;
-
- ccllaassss iissttrrssttrreeaamm :: ppuubblliicc iissttrreeaamm {{
- ppuubblliicc::
- iissttrrssttrreeaamm((cchhaarr**)) ;;
- iissttrrssttrreeaamm((cchhaarr**,, iinntt)) ;;
- ssttrrssttrreeaammbbuuff** rrddbbuuff(()) ;;
- }} ;;
-
- ccllaassss oossttrrssttrreeaamm :: ppuubblliicc oossttrreeaamm {{
- ppuubblliicc::
- oossttrrssttrreeaamm(());;
- oossttrrssttrreeaamm((cchhaarr**,, iinntt,, iinntt==iiooss::::oouutt)) ;;
- iinntt ppccoouunntt(()) ;;
- ssttrrssttrreeaammbbuuff** rrddbbuuff(()) ;;
- cchhaarr** ssttrr(());;
- }};;
-
- ccllaassss ssttrrssttrreeaamm :: ppuubblliicc ssttrrssttrreeaammbbaassee,, ppuubblliicc iioossttrreeaamm {{
- ppuubblliicc::
- ssttrrssttrreeaamm(());;
- ssttrrssttrreeaamm((cchhaarr**,, iinntt,, iinntt mmooddee));;
- ssttrrssttrreeaammbbuuff** rrddbbuuff(()) ;;
- cchhaarr** ssttrr(());;
- }};;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- ssttrrssttrreeaamm specializes iioossttrreeaamm for incore operations, that is, storing
- and fetching from arrays of bytes. The ssttrreeaammbbuuff associated with a
- ssttrrssttrreeaamm is a ssttrrssttrreeaammbbuuff [see ssssbbuuff(3C)].
-
- The following assumptions are made regarding the descriptions on this
- man page:
-
- * _s_s is a ssttrrssttrreeaamm.
-
- * _i_s_s is an iissttrrssttrreeaamm.
-
- * _o_s_s is an oossttrrssttrreeaamm.
-
- * _c_p is a cchhaarr**.
-
- * _m_o_d_e is an iinntt representing an ooppeenn__mmooddee.
-
- * _i and _l_e_n are iinntts.
-
- * _s_s_b is a ssttrrssttrreeaammbbuuff**.
-
- CCoonnssttrruuccttoorrss
- iissttrrssttrreeaamm((_c_p))
- Characters will be fetched from the (null-terminated) string _c_p.
- The terminating null character will not be part of the sequence.
- Seeks (iissttrreeaamm::::sseeeekkgg(())) are allowed within that space.
-
- iissttrrssttrreeaamm((_c_p,, _l_e_n))
- Characters will be fetched from the array beginning at _c_p and
- extending for _l_e_n bytes. Seeks (iissttrreeaamm::::sseeeekkgg(())) are allowed
- anywhere within that array.
-
- oossttrrssttrreeaamm(())
- Space will be dynamically allocated to hold stored characters.
-
- oossttrrssttrreeaamm((_c_p,,_n,,_m_o_d_e))
- Characters will be stored into the array starting at _c_p and
- continuing for _n bytes. If iiooss::::aattee or iiooss::::aapppp is set in _m_o_d_e,
- _c_p is assumed to be a null-terminated string and storing will
- begin at the null character. Otherwise storing will begin at _c_p.
- Seeks are allowed anywhere in the array.
-
- ssttrrssttrreeaamm(())
- Space will be dynamically allocated to hold stored characters.
-
- ssttrrssttrreeaamm((_c_p,,_n,,_m_o_d_e))
- Characters will be stored into the array starting at _c_p and
- continuing for _n bytes. If iiooss::::aattee or iiooss::::aapppp is set in _m_o_d_e,
- _c_p is assumed to be a null-terminated string and storing will
- begin at the null character. Otherwise storing will begin at _c_p.
- Seeks are allowed anywhere in the array.
-
- iissttrrssttrreeaamm MMeemmbbeerrss
- _s_s_b == _i_s_s..rrddbbuuff(())
- Returns the ssttrrssttrreeaammbbuuff associated with _i_s_s.
-
- oossttrrssttrreeaamm MMeemmbbeerrss
- _s_s_b == _o_s_s..rrddbbuuff(())
- Returns the ssttrrssttrreeaammbbuuff associated with _o_s_s.
-
- _c_p==_o_s_s..ssttrr(())
- Returns a pointer to the array being used and ``freezes'' the
- array. Once ssttrr has been called the effect of storing more
- characters into _o_s_s is undefined. If _o_s_s was constructed with an
- explicit array, _c_p is just a pointer to the array. Otherwise, _c_p
- points to a dynamically allocated area. Until ssttrr is called,
- deleting the dynamically allocated area is the responsibility of
- _o_s_s. After ssttrr returns, the array becomes the responsibility of
- the user program.
-
- _i==_o_s_s..ppccoouunntt(())
- Returns the number of bytes that have been stored into the
- buffer. This is mainly of use when binary data has been stored
- and _o_s_s..ssttrr(()) _d_o_e_s _n_o_t _p_o_i_n_t _t_o _a _n_u_l_l _t_e_r_m_i_n_a_t_e_d _s_t_r_i_n_g.
-
- ssttrrssttrreeaamm MMeemmbbeerrss
- _s_s_b == _s_s..rrddbbuuff(())
- Returns the ssttrrssttrreeaammbbuuff associated with _s_s.
-
- _c_p==_s_s..ssttrr(())
- Returns a pointer to the array being used and ``freezes'' the
- array. Once ssttrr has been called the effect of storing more
- characters into _s_s is undefined. If _s_s was constructed with an
- explicit array, _c_p is just a pointer to the array. Otherwise, _c_p
- points to a dynamically allocated area. Until ssttrr is called,
- deleting the dynamically allocated area is the responsibility of
- _s_s. After _s_t_r returns, the array becomes the responsibility of
- the user program.
-
- SSEEEE AALLSSOO
- ssttrrssttrreeaammbbuuff(3C), iiooss(3C), iissttrreeaamm(3C), oossttrreeaamm(3C)
-
- This man page is available only online.
-
-